<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <meta http-equiv='X-UA-Compatible' content='ie=edge'>
    <title>Document</title>
</head>

<body>
    <div id='app'>
        <div :style="{color:'red'}">你好</div>
        <div :style="{color:red,'font-size':size}">你好</div>
        <hr>
        <div :style="obj">123</div>
        <div :style="[obj]">123</div>
    </div>
    <script src='../js/vue.js'></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data: {
                red: 'green',
                size: '30px',
                obj: {
                    width: '200px',
                    height: '200px',
                    background: 'pink'
                }
            },
            methods: {},
        })
    </script>
</body>

</html>